Skip to content

feat: support folder crud commands#98

Merged
Yukaii merged 9 commits into
developfrom
feature/dev-2759-support-folder-api
May 26, 2026
Merged

feat: support folder crud commands#98
Yukaii merged 9 commits into
developfrom
feature/dev-2759-support-folder-api

Conversation

@EastSun5566
Copy link
Copy Markdown
Contributor

@EastSun5566 EastSun5566 commented May 13, 2026

Implement folder management commands based on the OpenAPI docs: https://api.hackmd.io/v1/docs

Adds support for personal/team folder operations in the CLI, and also adds --parentFolderId support to note create/update commands.

Changes

New topics

  • folders
  • team-folders

New commands

Personal workspace:

  • folders
  • folders create
  • folders update
  • folders delete
  • folders order

Team workspace:

  • team-folders
  • team-folders create
  • team-folders update
  • team-folders delete
  • team-folders order

Existing commands updated

These commands now support --parentFolderId:

  • notes create
  • notes update
  • team-notes create
  • team-notes update

Deps update

Updated @hackmd/api to v2.5.0. This version includes the folder APIs / typings.

SKILL.md update

Support folder APIs with commands and examples

Example

List folders

$ hackmd-cli folders
ID                                   Color   Description           Icon  Name        Parent Folder ID
──────────────────────────────────── ─────── ───────────────────── ───── ─────────── ────────────────────────────────────
91722050-bf47-4334-9e5d-87125a724c29 #4F46E5 Project documentation 1F600 engineering fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c

Create folder

$ hackmd-cli folders create --name='docs' --parentFolderId=fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c --description='Docs' --icon=1F600 --color=#4F46E5
ID                                   Name Parent Folder ID                     Color   Description Icon
──────────────────────────────────── ──── ──────────────────────────────────── ─────── ─────────── ─────
a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d docs fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c #4F46E5 Docs        1F600

Create note inside a folder

$ hackmd-cli notes create --parentFolderId=fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c --content='# A new note'

Manual testing

I manually tested:

  1. Creating a folder and then creating a note inside it
  2. Creating a nested folder with --parentFolderId
  3. Checking folders --help / team-folders --help
  4. Checking notes create/update and team-notes create/update with --parentFolderId

Example flows:

./bin/dev folders create --name 'hello from cli'
./bin/dev notes create --parentFolderId '<folder-id>' --title 'hello from cli'
./bin/dev folders create --name 'hello from cli'
./bin/dev folders create --name 'hello from cli 2' --parentFolderId '<folder-id>'

@EastSun5566 EastSun5566 self-assigned this May 13, 2026
@EastSun5566 EastSun5566 marked this pull request as ready for review May 18, 2026 12:02
@EastSun5566 EastSun5566 requested a review from Yukaii May 19, 2026 06:01
Copy link
Copy Markdown
Member

@Yukaii Yukaii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's goooooooooooo!

@Yukaii Yukaii merged commit 3b28cca into develop May 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants